package cn.bklovezz.yixiantong.ram.util;

import cn.bklovezz.yixiantong.ram.dto.AdminLoginUser;
import org.springframework.stereotype.Component;

@Component
public class UserUtil {
  public String getCheckUsernameAndPasswordMessage(AdminLoginUser user) {
    String username = user.getUsername(),
            password = user.getPassword();
    if (username == null || username.equals("")) {
      return "用户名不能为空";
    }
    if (password == null || password.equals("")) {
      return "密码不能为空";
    }
    return "";
  }
}
